<%@
page import="javax.servlet.*, 
		javax.servlet.http.*,
		java.io.*,
		java.util.*,
		com.lowagie.text.pdf.*,
		com.lowagie.text.*,
                com.geek.tutorial.itext.image.*,
                com.geek.tutorial.itext.text.*"
%><%

response.setContentType("application/pdf");
Document document = new Document();
try{
	BPDEXLey crearBPDEXLey = new BPDEXLey();
        ByteArrayOutputStream buffer = crearBPDEXLey.crearBPDEXLey();
        
        DataOutput dataOutput = new DataOutputStream(response.getOutputStream());
	byte[] bytes = buffer.toByteArray();
	response.setContentLength(bytes.length);
	for(int i = 0; i < bytes.length; i++)
	{
		dataOutput.writeByte(bytes[i]);
	}
	
}catch(DocumentException e){
	e.printStackTrace();
}

%>